# Maintainer: Antoni Aloy <aaloytorrens@gmail.com>
pkgname=py3-proglog
pkgver=0.1.10
pkgrel=2
pkgdesc="Log and progress bar manager for console, notebooks, web"
url="https://github.com/Edinburgh-Genome-Foundry/Proglog"
arch="noarch"
license="MIT"
depends="
	py3-tqdm
	python3
	"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/Edinburgh-Genome-Foundry/Proglog/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/Proglog-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
5613643430d9842efa4b4061a1afcefdbbf7b7367a7ccd61b35080c7b514b384bec40457e18cf21dd637885249efe827b9604751a3c7980dce48a5a28a0eb07b  py3-proglog-0.1.10.tar.gz
"
